-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: improve test-fs-open-flags #10908
Conversation
* use arrow funcion instead of function expression * add second argument to method assert.throws * check error messages from beginning to the end using ^ and $
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes but looks good =)
); | ||
|
||
assert.throws( | ||
() => stringToFlags(true), | ||
/Unknown file open flag: true/ | ||
/^Error: Unknown file open flag: true$/ | ||
); | ||
|
||
assert.throws( | ||
() => stringToFlags(null), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
@edsadr, I only added new lines between lines 40 and 43. Should I update all the lines pointed out by you? |
I think my preference would be that you leave it as you currently have it, keeping the style of the existing file with the first argument on a line by itself. If you move all the args to the same line as the function call's opening parenthesis, then the linter will make you align all subsequent arguments, resulting in more churn. An then there will be yet more churn if that additional indentation causes a line to extend beyond 80 characters. So I think I actually would rather you keep it just like you already have it. That said, I don't feel strongly about it, so if @edsadr or anyone else has compelling reasons for wanting those changes, I'm OK with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if CI is green
@Trott, can you give me a feedback about the CI? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vinimdocarmo the CI is green, I was concerned about identation but as @Trott explains this could lead to more linting problems, then is fine and then.. LGTM 👍🏽
@vinimdocarmo PRs stay open for at least 48 hours and that goes up to 72 hours if it stretches into a weekend like this one will. (Fell free to leave a "bump" comment if it's still open on Monday.) |
Okay, @Trott. |
* use arrow funcion instead of function expression * add second argument to method assert.throws * check error messages from beginning to the end using ^ and $ PR-URL: #10908 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Landed in a024104, thanks for your contribution @vinimdocarmo |
* use arrow funcion instead of function expression * add second argument to method assert.throws * check error messages from beginning to the end using ^ and $ PR-URL: nodejs#10908 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* use arrow funcion instead of function expression * add second argument to method assert.throws * check error messages from beginning to the end using ^ and $ PR-URL: nodejs#10908 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* use arrow funcion instead of function expression * add second argument to method assert.throws * check error messages from beginning to the end using ^ and $ PR-URL: nodejs#10908 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* use arrow funcion instead of function expression * add second argument to method assert.throws * check error messages from beginning to the end using ^ and $ PR-URL: nodejs#10908 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* use arrow funcion instead of function expression * add second argument to method assert.throws * check error messages from beginning to the end using ^ and $ PR-URL: #10908 Backport-PR-URL: #13785 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* use arrow funcion instead of function expression * add second argument to method assert.throws * check error messages from beginning to the end using ^ and $ PR-URL: #10908 Backport-PR-URL: #13785 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* use arrow funcion instead of function expression * add second argument to method assert.throws * check error messages from beginning to the end using ^ and $ PR-URL: #10908 Backport-PR-URL: #13785 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Adrian Estrada <edsadr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Checklist
make -j4 test
(UNIX)Affected core subsystem(s)
test